feat(vom): support screenshot-bound point clicks on canvas surfaces | 支持基于截图坐标点击 canvas surface - #143
Open
Ljy-0827 wants to merge 3 commits into
Open
Conversation
Ljy-0827
force-pushed
the
feat/vom-surface-point-interaction
branch
from
August 26, 2026 07:28
573dad1 to
976bce1
Compare
iuyo5678
force-pushed
the
feat/vom-surface-point-interaction
branch
from
August 28, 2026 03:24
976bce1 to
0806597
Compare
Ljy-0827
force-pushed
the
feat/vom-surface-point-interaction
branch
2 times, most recently
from
August 28, 2026 06:31
fd55376 to
feb3da0
Compare
Ljy-0827
force-pushed
the
feat/vom-surface-point-interaction
branch
from
August 28, 2026 07:50
feb3da0 to
88da6ca
Compare
Ljy-0827
force-pushed
the
feat/vom-surface-point-interaction
branch
from
August 28, 2026 09:27
88da6ca to
21b1deb
Compare
Ljy-0827
force-pushed
the
feat/vom-surface-point-interaction
branch
from
August 31, 2026 06:31
21b1deb to
f5dab95
Compare
Ljy-0827
marked this pull request as ready for review
August 31, 2026 06:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
PR #138 已经能够在
observe中发现 Canvas 可视区域,将其表示为 visual-only Surface,并允许 Agent 按 Surface ref 获取局部截图。但该 PR 只建立了“发现 Canvas → 截图”的链路。即使支持多模态的 Agent 能够从截图中识别目标,仍然无法安全地点击 Canvas 内部的具体位置。直接使用截图坐标或视口坐标存在以下问题:
pointermove后的异步 hit-test 更新;直接发送 press/release 不一定能触发正确行为。因此,需要建立一条受约束、可验证的链路,把 Agent 在某次 Surface 截图中选择的图片像素坐标,安全地转换为当前页面中的实际点击位置。
解决方案
参考 codex 的实现方法,本 PR 为 Canvas Surface 增加 screenshot-bound point click:
Surface 截图会返回一个短期、单次使用的 Capture ID。
Agent 将 Capture ID 和截图像素坐标传给普通 click 命令:
BrowserSkill 将截图坐标转换为顶层 viewport 坐标,并支持 iframe、OOPIF 和嵌套 frame。
点击前会校验 session、tab、Surface、页面导航、视口、滚动、缩放和 frame projection 是否仍与截图时一致。
Capture 过期、重复使用或页面状态变化时,操作会失败,并要求重新观察和截图。
点击通过完整的
mouseMoved → mousePressed → mouseReleased序列执行。未提供完整 Capture 参数时,Surface ref 仍然是 screenshot-only;Agent 不能绕过截图直接猜测坐标。
边界
前序 PR 负责发现和截图 Canvas;本 PR 负责把“某次截图中的一个像素点”安全、一次性地绑定到 Canvas 点击。